<template>
  <div class="cart-list">
      <scroll class="content" ref="scroll">
        <cart-list-item 
          v-for="(item,index) in cartList" 
          :itemInfo="item" 
          :key="index"/>
      </scroll>
  </div>
</template>

<script>
import Scroll from "components/common/scroll/Scroll"

import CartListItem from "./CartListItem"

import {mapGetters} from "vuex"
export default {
    name: "CartList",
    computed: {
      ...mapGetters(['cartList'])
    },
    components: {
      Scroll,
      CartListItem
    },
    activated() {
      this.$refs.scroll.refresh()
    }

}
</script>

<style scoped>
.cart-list {
  /* margin-top: 44px; */
  height: calc(100% - 84px - 49px);
}

.content {
  height: 100%;
  overflow: hidden;
}

</style>